package Mangos::DB::Mangos::Creature;

use strict;

use base qw(Mangos::DB::Mangos);

__PACKAGE__->meta->setup
(
    table   => 'creature',

    columns => 
    [
        guid            => { type => 'integer', not_null => 1 },
        id              => { type => 'integer', default => '0', not_null => 1 },
        map             => { type => 'integer', default => '0', not_null => 1 },
        spawnMask       => { type => 'integer', default => 1, not_null => 1 },
        phaseMask       => { type => 'integer', default => 1, not_null => 1 },
        modelid         => { type => 'integer', default => '0', not_null => 1 },
        equipment_id    => { type => 'integer', default => '0', not_null => 1 },
        position_x      => { type => 'float', default => '0', not_null => 1, precision => 32 },
        position_y      => { type => 'float', default => '0', not_null => 1, precision => 32 },
        position_z      => { type => 'float', default => '0', not_null => 1, precision => 32 },
        orientation     => { type => 'float', default => '0', not_null => 1, precision => 32 },
        spawntimesecs   => { type => 'integer', default => 120, not_null => 1 },
        spawndist       => { type => 'float', default => 5, not_null => 1, precision => 32 },
        currentwaypoint => { type => 'integer', default => '0', not_null => 1 },
        curhealth       => { type => 'integer', default => 1, not_null => 1 },
        curmana         => { type => 'integer', default => '0', not_null => 1 },
        DeathState      => { type => 'integer', default => '0', not_null => 1 },
        MovementType    => { type => 'integer', default => '0', not_null => 1 },
    ],

    primary_key_columns => [ 'guid' ],
);

1;

package Mangos::DB::Mangos::Creature::Manager;

use strict;
use warnings;

use base 'Rose::DB::Object::Manager';

sub object_class { 'Mangos::DB::Mangos::Creature' }

__PACKAGE__->make_manager_methods('creature');

1;
